#include <stdlib.h>
#include <stdio.h>
#include <uf.h>
#include <uf_defs.h>
#include <uf_draw.h>
#include <uf_draw_types.h>
#include <uf_obj.h>
#include <uf_part.h>
void ufusr(char *param, int *retcod, int param_len)
{
  int         ifail = 0;
  double      reference_point[2] = {70.0, 160.0};
  tag_t       drawing_tag = NULL_TAG;
  tag_t       part_tag = NULL_TAG;
  tag_t       view_tag = NULL_TAG;
  tag_t       draw_view_tag = NULL_TAG;
  char        *view_name = "BOTTOM";
  UF_DRAW_view_info_t view_info;

  view_info.view_status = UF_DRAW_ACTIVE_VIEW;
  view_info.anchor_point = NULL_TAG;
  view_info.view_scale = 1.0;
  view_info.use_ref_pt = FALSE;
  view_info.inherit_boundary = FALSE;
  view_info.transfer_annotation = TRUE;

  UF_DRAW_view_prfs_t view_display_parms;

  ifail = UF_initialize();

  if( !ifail )
      part_tag = UF_PART_ask_display_part();

  if( !ifail && part_tag != NULL_TAG )
      ifail = UF_DRAW_ask_current_drawing( &drawing_tag );

  if( !ifail && part_tag != NULL_TAG && drawing_tag != NULL_TAG)
  {
      ifail = UF_OBJ_cycle_by_name( view_name, &view_tag );
      if( !ifail && view_tag != NULL_TAG )
      {
          ifail = UF_DRAW_import_view( drawing_tag, view_tag,reference_point, &view_info,  &draw_view_tag );
		   UF_DRAW_delete_view_label ( view_tag );
		  UF_DRAW_set_view_display(drawing_tag,&view_display_parms);		  
	      UF_DRAW_update_one_view(drawing_tag,draw_view_tag);
	  }
  }
     ifail = UF_terminate();
}

